<?php

class tSysModuleVar extends CActiveRecord
{
	/**
	 * The followings are the available columns in table 'sys_module_var':
	 * @var integer $smv_id
	 * @var string $smv_name
	 * @var string $smv_value
	 * @var integer $id_module
	 */

	/**
	 * Returns the static model of the specified AR class.
	 * @return CActiveRecord the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'sys_module_var';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		return array(
			array('smv_name','length','max'=>45),
			array('smv_value','length','max'=>255),
			array('smv_name, smv_value, id_module', 'required'),
			array('id_module', 'numerical', 'integerOnly'=>true),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'smv_id' => 'Smv',
			'smv_name' => 'Smv Name',
			'smv_value' => 'Smv Value',
			'id_module' => 'Id Module',
		);
	}
}